<?php
namespace app\admin\controller;
use \think\Controller;
use \think\Db;
class Types extends Controller
{
	public function index(){
		$types=Db::name('types')->select();
		$this->assign('types',$types);
		return $this->fetch();
	}
	public function delete($id){
		if(Db::name('types')->delete($id)){
			$this->success('删除成功');
		}
		else{
			$this->error('删除失败');
		}

	}

public function index1(){
		
		return $this->fetch();
	}
}